This invention relates generally to object-oriented computing environments, and more particularly to linking properties in such environments.
Object-oriented programming environments are currently the standard environment in which computer programs are developed. For example, within the Microsoft Windows operating system, programs may be developed using the Component Object Model (COM) architecture. Object-oriented programming environments provide a modular manner by which developers can develop complex and sophisticated computer programs.
Generally, an object may include data and methods by which that data is accessed and changed. Thus, new methods may be added to the object for accessing and changing the data in other ways not previously possible, without affecting existing methods, and the external objects that rely on these existing methods. Upon receiving a message, or in response to an event, an object typically executes a particular method, resulting in the data within that object being retrieved or changed.
Object-oriented environments provide end users with advantages over other environments, especially when they are used in the context of graphical user interfaces (GUI""s). Rather than memorizing a sequence of keystrokes to save a file, for example, a user in a graphical user interface may instead only have to pull down a file menu, and choose the save option. A dialog box then may appear, allowing the user to enter in the name of the file to be saved, and after which the user clicks an xe2x80x9cOKxe2x80x9d button to actually save the file.
However, object-oriented environments in the context of GUI""s can at times make the programming process more difficult for programmers who have to develop the end-user applications. In the example just described, for instance, the programmer may wish to have the xe2x80x9cOKxe2x80x9d button initially disabled before the user has entered in the name of a file to be saved in a text box, to indicate that until a name is entered, the program cannot actually perform the save operation. Then, when the user starts entering a name in the text box, desirably the programmer may wish the xe2x80x9cOKxe2x80x9d button to become enabled. Under the prior art, this is difficult to accomplish without increased programming development on the part of the programmer, which results in increased overhead for the application program.
For these and other reasons, there is a need for the present invention.
The invention provides for property linking for object-oriented environments. In one embodiment, a computer-implemented method includes first linking a second property of a second object to a first property of a first object, according to a predetermined criteria. When an event occurs regarding a change in the first property, the change is examined in relation to the predetermined criteria, to determine whether the change in this property necessitates a change in the second property. If it does, then the second property is changed in accordance with the predetermined criteria.
Embodiments of the invention provides for advantages not found in the prior art. For instance, with respect to the example described in the background section, an xe2x80x9cOKxe2x80x9d button and a text box may each be a different object (or, container or control, depending on the nomenclature of a given object-oriented object model). Whether the xe2x80x9cOKxe2x80x9d button is disabled or enabled may be a property of the xe2x80x9cOKxe2x80x9d button object, while whether the text box is empty or contains text may be a property of the text box object. The disabled property of the xe2x80x9cOKxe2x80x9d button object is linked to the empty property of the text box object, such that if the latter is TRUE (indicating that the text box is empty), the former is TRUE as well (indicating that the xe2x80x9cOKxe2x80x9d button object is disabled). When an event occurs indicating that the empty property of the text box object changesxe2x80x94for example, to FALSE once a user has entered input into the boxxe2x80x94then an evaluate method of one embodiment of the invention determines whether this change necessitates a change to the disabled property, too. Thus, the disabled property changes to FALSE (indicating that the xe2x80x9cOKxe2x80x9d button should be enabled) incident to the empty property changing.
The invention includes systems, methods, computers, and computer-readable media of varying scope. Besides the embodiments, advantages and aspects of the invention described here, the invention also includes other embodiments, advantages and aspects, as will become apparent by reading and studying the drawings and the following description.